package com.yun.blog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yun.blog.bean.Comment;
import com.yun.blog.dao.CommentMapper;
import com.yun.blog.service.CommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 博客评论
 *
 * @author simple
 * @date 2023-05-04 21:37
 */

@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment>
        implements CommentService {

    @Resource
    private CommentMapper commentMapper;

    @Override
    public List<Comment> getCommentsByBlogId(Integer blogId) {
        return commentMapper.selectAllByBlogId(blogId);
    }
}
